package com.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.app.entity.Student;
import com.app.request.QueryRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
  *  Mapper 接口
 * </p>
 * @author lijh
 */
@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    @Select("<script> " +
            "select * from tb_student where 1=1 " +
            "<if test='stuName !=null and stuName!=\"\"'> " +
            "and stu_name=#{stuName}" +
            "</if>" +
            "</script>")
    List<Student> selectStudentByStuName(QueryRequest request);

}